package cc.controller;

import cc.entity.Employee;
import cc.entity.Meeting;
import cc.repository.MeetingRepository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author My
 * @date 2021/7/6 13:23
 */
@RestController
@RequestMapping("/meeting")
//说明接口文件
@Api(value = "会议管理", tags = "会议管理", description = "会议管理")
public class MeetingController {

    @Autowired
    MeetingRepository meetingRepository;

    @ApiOperation(value = "新增记录")
    @PostMapping("/add.do")
    public Meeting add(@RequestBody Meeting one) {
        one.setId(null);
        return meetingRepository.save(one);
    }
}
